package cn.tedu.oa_system.controller;

import cn.tedu.oa_system.base.json_result.ResultDataDto;
import cn.tedu.oa_system.pojo.SysMenu;
import cn.tedu.oa_system.service.RoleService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author MW
 * @Description 角色相关控制器
 * @CreateDate 2023/3/6
 */
@RequestMapping("/role")
@RestController
@Slf4j
public class RoleController {

    @Autowired
    private RoleService roleService;

    @GetMapping("/menulist")
    private ResultDataDto<SysMenu> menuList(Long roleId){
        return roleService.permissionsList(roleId);
    }
}
